import Vue from "vue"
Vue.mixin({
	data:function(){
		return{
			baseUrl : 'https://ksa.zhucaiyan.cn/api/',	
			baseImg : 'https://ksa.zhucaiyan.cn/uploads/',
			// baseUrl : 'http://47.105.123.92/api/',
			
		 //    baseImg : 'http://47.105.123.92/images/',
			// baseUrl : 'https://ks.bsn999.cn/api/',
			
			// baseImg : 'https://ks.bsn999.cn/uploads/'
		}
	},
	created() {
		
	},
	mounted(){
		
	},
	methods:{
		imgPreview(item){
				console.log(item);
				let arr = []
				arr.push(item)
				uni.previewImage({
					urls:arr
				})
		},
		goBack(){
			uni.navigateBack({
				delta:1
			})
		},
		copyCode(val){
			let _this = this;
			uni.setClipboardData({
			    data: val,
			    success: function () {
			        _this.toast('复制成功')
			    },
				fail() {
					_this.toast('复制失败请稍后重试')
				}
			});
		},
		apiSetStorage(key,val){
			uni.setStorageSync(key, val);
		},
		uOpenWin(url){
			uni.navigateTo({
				url:url
			})
		},
		toast(data){
			uni.showToast({
				icon:'none',
				title:data
			})
		}
	}
})